package com.gitee.luosl.cola.lang.function;

public interface Predicate3<T1, T2, T3> {

    boolean test(T1 t1, T2 t2, T3 t3);

    default Predicate3<T1, T2, T3> and(Predicate3<T1, T2, T3> predicate) {
        return (t1, t2, t3) -> test(t1, t2, t3) && predicate.test(t1, t2, t3);
    }

    default Predicate3<T1, T2, T3> or(Predicate3<T1, T2, T3> predicate) {
        return (t1, t2, t3) -> test(t1, t2, t3) || predicate.test(t1, t2, t3);
    }

    default Predicate3<T1, T2, T3> negate() {
        return (t1, t2, t3) -> !test(t1, t2, t3);
    }

}
